import { EggAppConfig, PowerPartial } from 'egg';
import { production } from './database';

const {
  ALI_NODE_APP_ID,
  ALI_NODE_SECRET
} = process.env;

export default () => {
  const config: PowerPartial<EggAppConfig> = {
    sequelize: production
  };

  config.alinode = {
    appid: ALI_NODE_APP_ID,
    secret: ALI_NODE_SECRET
  };

  return config;
};
